﻿@model IEnumerable<HotelManageSystem.Models.WarehouseModel>
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_LayoutWarehouseInstall.cshtml";
}
@section Head
{
    <link href= "@Url.Content("~/Content/TelerikGrid.css")"rel="stylesheet" type="text/css"></link>
}

@(Html.Telerik()
    .Grid(Model)
    .Name("Warehouse")
    .DataKeys(keys=>keys.Add(x=>x.WarehouseID))
    .ToolBar(commands=>commands.Insert())
    .DataBinding(dataBinding=>dataBinding.Ajax()
                                  .Select("SelectAjax", "Warehouse")
                                      .Insert("Insert", "Warehouse")
                                      .Update("Update", "Warehouse")
                                      .Delete("Delete", "Warehouse")
                                  )
    .Columns(columns=>
                 {
                     columns.Bound(x => x.Name);
                     columns.Bound(x => x.Employee);
                     columns.Command(commands =>
                                         {
                                             commands.Edit();
                                             commands.Delete();
                                         });
                 })
    .Editable(editing=>editing.Mode(GridEditMode.PopUp))
    .Pageable()
    .Sortable()
    .Filterable()
    .Scrollable())
